﻿using System.ComponentModel.Composition;
using System.Web.Mvc;
using SeventhSenseSystems.HighFlyingPm.Business.Models;

namespace WebBusiness.Controllers
{
    [Export("home", typeof (IController))]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public class HomeController : BaseController
    {
        private readonly IProjectRepository projectRepository;

        [ImportingConstructor]
        public HomeController(IProjectRepository projectRepository)
        {
            this.projectRepository = projectRepository;
        }

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Projects()
        {
            return View(projectRepository.All);
        }
    }
}